import sys
import cv2


def variance_of_laplacian(image):
    # compute the Laplacian of the image and then return the focus
    # measure, which is simply the variance of the Laplacian
    return cv2.Laplacian(image, cv2.CV_64F).var()


if __name__ == '__main__':
    img_file = sys.argv[1]
    img = cv2.imread(img_file)

    # blur: < 200, not blur >= 200
    print(variance_of_laplacian(img))

